package com.yuqian;

import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017/7/26 0026.
 */
@RestController
public class GroupRest {
    /**
     *

    @Autowired
    private static GroupUsersRespository repository;


    public static List<Group> getGrpoup(String userId){
        List<Grouppeoples>  groupUsers = null;
        if (userId.equals("all")){
          //  groupUsers=repository.findAll();
        }else {
       //     groupUsers=repository.findGroupUsersByUser_id(userId);
        }
      // groupUsers=repository.findGroupUsersByUser_id(userId);
        List<Group> groups=new ArrayList<>();
        for (Grouppeoples group: groupUsers){
            Group groupinfo=new Group();
            groupinfo.setGroupn_name(group.getGroup_name());
            groups.add(groupinfo);
        }


        return groups;
    }
     */
}
